<?php
$arr = array(1 => "ab", 2 => "cd", 3 => "ef", 4 => "fg");
//for ($i=1;$i<count($arr);$i++){
//    echo $arr[$i];
//}
foreach ($arr as $key => $value) {
    echo $key . "=>" . $value . " ";
}